import createAxios from '/@/utils/axios'

// 合并订单
export const controllerUrl = '/admin/purchase.Merge/'


// 撤回出货状态
export function withdrawShipmentStatusApi(order_id: number){
    return createAxios({
        url: controllerUrl + 'withdrawShipmentStatus',
        method: 'get',
        params: {
            order_id: order_id,
        }
    },{
        showSuccessMessage: true
    })
}


// 保存出货状态
export function saveShipmentStatusApi(order_id: number, shipment_status: number){
    return createAxios({
        url: controllerUrl + 'saveShipmentStatus',
        method: 'get',
        params: {
            order_id: order_id,
            shipment_status: shipment_status
        }
    },{
        showSuccessMessage: true
    })
}

export function agencyFee(data: anyObj) {
    return createAxios({
        url: controllerUrl + 'agencyFee',
        method: 'post',
        data: data,
    },{
        showSuccessMessage: true,
    })
}

export function getUserInfo(userId: number) {
    return createAxios({
        url: controllerUrl + 'getUserInfo',
        method: 'get',
        params: {
            user_id: userId,
        },
    })
}

